<!-- 使用 type="home" 属性设置首页，其他页面不需要设置，默认为page；推荐使用json5，更强大，且允许注释 -->
<route lang="json5">
{
  style: {
    navigationStyle: 'custom',
    navigationBarTitleText: '我的粉丝',
    navigationBarRightButton: {
      hide: true,
    },
  },
}
</route>
<template>
  <view
    class="w-full h-full bg-white overflow-hidden box-border"
    :style="{ paddingTop: safeAreaInsets?.top + 'px' }"
  >
    <view class="w-full h-full home-container">
      <wd-navbar @click-left="handleClickLeft">
        <template #title>
          <text class="text-gray-333 font-size-36 font-500">我的粉丝</text>
        </template>
        <template #left>
          <wd-icon
            name="chevron-left"
            class="text-gray-333 font-size-44"
            @click="pagesBack"
          ></wd-icon>
        </template>
      </wd-navbar>
      <view class="w-full h-full p-x-28 p-y-32 home-content">
        <view class="flex justify-start mg-b-40" v-for="(item, index) in fansList" :key="index">
          <view class="wr-96 hr-96 rd-48 flex justify-start items-center overflow-hidden">
            <image width="96rpx" height="96rpx" :src="item.avatar" />
          </view>
          <view class="flex flex-col justify-center mg-l-24">
            <view class="font-size-28 font-400 text-gray-333 line-h-40">{{ item.nickname }}</view>
            <view class="font-size-24 font-400 text-gray-999 line-h-34 mg-t-8">
              {{ item.create_time }}
            </view>
          </view>
        </view>
      </view>
    </view>
  </view>
</template>

<script lang="ts" setup>
import { shareGetFans } from '@/service/my/my'

defineOptions({
  name: 'ShareLedger',
})
const { safeAreaInsets } = uni.getSystemInfoSync()
const handleClickLeft = () => {}
const pagesBack = () => {
  uni.navigateBack()
}
const fansList = ref([])
onLoad(() => {})
onShow(() => {
  getData()
})
const getData = () => {
  shareGetFans().then((res: any) => {
    if (res.data) {
      fansList.value = res.data.data
    }
  })
}
</script>

<style scoped lang="scss">
.home-container {
  position: relative;
  z-index: 1;
}
.home-content {
  height: calc(100% - var(--wot-navbar-height, 88rpx));
  overflow: auto;
}
.box-linear-bg {
  background: linear-gradient(90deg, #ece7f6 0%, #dfdfff 100%);
}
.tab-con-height {
  height: calc(100vh - 256rpx);
}
::v-deep .wd-button {
  width: 100% !important;
  height: 100% !important;
}
::v-deep .wd-tabs__nav-item {
  font-size: 32rpx !important;
  color: #312f2a !important;
}
</style>
